1. Field of the Invention
The present invention relates to a data recording and reproducing method and apparatus which is preferably used in a personal computer, a home server, a video server formed by a digital versatile disc (DVD) video recorder and a hard disc recorder, and the like, and more particularly, the improvement of a data compression (transcode) in the data recording and reproducing method and apparatus.
2. Description of the Related Art
Generally, in a data recording and reproducing apparatus, a data recompression technology which is called a transcode technology has been adopted. For example, when the capacity of a storage unit is expected to be short while a video/speech signal of a program is being compressed and recorded in the storage unit, a recompressing operation is performed upon data which is already compressed and stored in the storage unit, so as to substantially expand the vacant area of the storage unit. As a result, the above-mentioned program can be completely stored in the storage unit by using the expanded vacant area of the storage unit.
Note that the present invention can be applied not only to a transcode technology, but also to a conventional data compression technology.
In a first prior art data recording and reproducing apparatus (see: JP-A-59-60666, JP-A-2000-066873 and JP-A-2001-231009), when the capacity of a storage unit is expected to be short while transaction data is being recorded in the storage unit, a compressing operation is performed upon data which is already recorded in the storage unit, so as to substantially expand the vacant area of the storage unit. As a result, the above-mentioned transaction data can be completely recorded in the storage unit.
In the above-described first prior art data recording and reproducing apparatus, however, since the compressing operation is performed upon the entire data stored in the storage unit, high priority level data which is expected to be of high quality is also subjected to the compressing operation, so that the quality of the high priority level data deteriorates. Also, if it takes a long time to perform the compressing operation, the vacant area of the storage unit is also short which may incompletely record the transaction data in the storage unit.
In a second prior art data recording and reproducing apparatus (see: JP-A-2000-89983), when the capacity of a storage unit is expected to be short while transaction data is being recorded in the storage unit, a compressing operation is performed upon data having the minimum access frequency and the oldest final access date which is already recorded in the storage unit, so as to substantially expand the vacant area of the storage unit.
In the above-described second prior art data recording and reproducing apparatus, although the transaction data can be completely recorded in the storage unit, high priority level data is also subjected to the compressing operation, so that the quality of the high priority level data deteriorates.
In a third prior art data recording and reproducing apparatus (see: JP-A-2000-322291), compressed data recorded in a storage unit are rearranged to be continuous so that the vacant area of the storage unit is continuous. Then, each of the compressed data is expanded and moved from the non-vacant area of the storage unit to the vacant area of the storage unit.
In the above-described third prior art data recording and reproducing apparatus, although a vacant area is made continuous in the storage unit, there is no disclosure regarding the compression of high priority level data.
In a fourth prior art data recording and reproducing apparatus (see: JP-A-10-271498), when the capacity of a storage unit is expected to be short while picture data is being recorded in the storage unit, a recompressing operation is performed upon compressed picture data which is already recorded in the storage unit, so as to substantially expand the vacant area of the storage unit. In this case, the recompression bit rate depends on the quality of the compressed data, thus maintaining the entire quality level.
In the above-described fourth prior art data recording and reproducing apparatus, however, in order to carry out a recompressing operation simultaneously with retrieving, editing and specially-reproducing operations, a management data showing a relationship among addresses on the storage unit, the number of picture data, and the number of a picture group is provided. As a result, every time a recompressing operation is carried out, the management data has to be renewed and recorded.
It is an object of the present invention to provide a data recording and reproducing method and apparatus capable of compressing (or recompressing) individual data blocks in accordance with the quality thereof with a minimum change of management data.
According to the present invention, in a data recording and reproducing method, data blocks are recorded in a storage unit. Priority levels each for one of the data blocks are set and stored. It is determined whether or not a vacant area of the storage unit is expected to be short. When the vacant area of the storage unit is expected to be short, the data blocks recorded in the storage unit are recompressed in accordance with the stored priority levels.